package HomeWork;

/**
 * @description:
 * @Author yyp
 * @time
 */
public class HomeWork02 {
    public static void main(String[] args) {
        Frock.getNextNum();
        Frock.getNextNum();
        Frock f1 = new Frock();
        Frock f2 = new Frock();
        Frock f3 = new Frock();
        System.out.println(f1.serialNumber);
        System.out.println(f2.serialNumber);
        System.out.println(f3.serialNumber);
    }
}

class Frock{
    static int currentNum = 100000;
    static int getNextNum(){
        currentNum+=100;
        return currentNum;
    }
    int serialNumber = 0;
    int getSerialNumber(){
        return this.serialNumber;
    }
    public Frock(){
        this.serialNumber = getNextNum();
    }
}

